package com.tungse.study.rpc;


import com.tungse.study.rpc.framework.entity.RpcUri;
import com.tungse.study.rpc.framework.protocol.HttpServer;
import com.tungse.study.rpc.framework.register.LocalRegister;
import com.tungse.study.rpc.framework.register.RemoteMapRegister;
import com.tungse.study.rpc.service.ProducerService;
import com.tungse.study.rpc.service.impl.ProducerServiceImpl;

/**
 * @author Tungse
 */
public class ProducerApplication {
    public static void main(String[] args) {
        //本地注册
        LocalRegister.register(ProducerService.class.getName(), ProducerServiceImpl.class);
        RemoteMapRegister.register(ProducerService.class.getName(), new RpcUri("localhost", 8081));
        //启动服务(tomcat)
        HttpServer httpServer = new HttpServer();
        httpServer.start("locathoost", 8081);



    }
}
